package io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizzafactory;

import io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizza.NYStyleCheesePizza;
import io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizza.NYStylePepperPizza;
import io.gitee.yth.design.pattern.test.core.pattern.creational.factory.pizza.Pizza;


/**
 * @author yth
 * @since 2023-04-17-14:03
 */
public class NYPizzaFactory implements IPizzaFactory {
    @Override
    public Pizza createPizza(String orderType) {
        switch (orderType) {
            case "cheese":
                return new NYStyleCheesePizza();
            case "pepper":
                return new NYStylePepperPizza();
            default:
                return null;
        }
    }
}
